package com.henu.engineer.dao.mapper.cultivatingproject

import com.henu.engineer.dao.entity.cultivatingproject.IndicatorCourse
import org.apache.ibatis.annotations.Mapper
import org.springframework.stereotype.Repository

/**
 *
 * @author noexcept
 * @since 2021/8/10 15:32
 */
@Mapper
@Repository
interface IndicatorCourseXmlMapper {

    // TODO: 2021/8/10 写对应的mapper文件 

    fun insertSingle(indicatorId: Int, courseSysId: String, intensity: Double): Boolean

    fun insertList(IndicatorCourses: List<IndicatorCourse>): Int

    /**
     * 删除与某个指标点关联的所有支撑关系
     */
    fun deleteByIndicator(indicatorId: Int): Boolean

    fun deleteByIndicatorIdAndCourseSysId(indicatorId: Int, courseSysId: String): Boolean

    fun deleteByIndicatorIdAndCourseSysIds(indicatorId: Int, courseSysIds: List<String>): Int

    fun updateIntensity(indicatorId: Int, courseSysId: String, intensity: Double): Boolean

    fun selectByIndicatorId(indicatorId: Int): List<IndicatorCourse>

    fun selectByIndicatorAndCourseSysId(indicatorId: Int, courseSysId: String): IndicatorCourse

    fun selectByIndicatorIds(indicatorIds: List<Int>): List<IndicatorCourse>
}